package com.chinatelecom.auth.mockmvc;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.util.ParameterizedTypeImpl;
import com.chinatelecom.dp.share.service.result.RestResult;
import org.springframework.http.HttpStatus;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * Created by liujinyao on 2017/7/28.
 */
public class AuthHttpResponse<T> {

    public HttpStatus status;
    public String content;

    public T content(Type type){
        if(content==null){
            return null;
        }

        return JSON.parseObject(content, type);
    }

}
